import request from '@/utils/request'

/**
 * 数据字典分页查询
 * @param {查询条件} data
 */
export function getDataDicPageList(data) {
  return request({
    url: 'baseFrame/dataDic/pageList',
    method: 'post',
    data: data,
  })
}

export function getDataDicTreeSelectList(data){
    return request({
        url: 'baseFrame/dataDic/treeSelectList',
        method: 'post',
        data: data,
    })
}



/**
 * 新增数据字典
 * @param data
 */
export function addDataDic(data) {
  return request({
    url: 'baseFrame/dataDic/add',
    method: 'post',
    data: data,
  })
}

/**
 * 修改数据字典
 * @param data
 */
export function modifyDataDic(data) {
  return request({
    url: 'baseFrame/dataDic/modify',
    method: 'post',
    data: data,
  })
}

export function changeDataDicState(data) {
    return request({
        url: 'baseFrame/dataDic/changeState',
        method: 'post',
        data: data,
    })
}


/**
 * 获取数据字典详情
 * @param {Id}
 */
export function getDataDicDetail(id) {
  return request({
    url: 'baseFrame/dataDic/detail/' + id,
    method: 'get'
  })
}

/**
 * 删除数据字典
 * @param {主键} pid
 */
export function delDataDic(data) {
  return request({
    url: 'baseFrame/dataDic/delete',
    method: 'post',
    data:data
  })
}

